<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTransferPlantsTable extends Migration
{
    /**
     * Run the migrations.
     * 二次分拣中心站---硬件绑定
     *
     * @return void
     */
    public function up()
    {
        Schema::create('transfer_plants', function (Blueprint $table) {
            $table->increments('id');
            $table->char('imei',15)->comment('设备唯一imei')->nullable();
            $table->string('name')->comment('设备名称')->nullable();
            $table->string('address')->comment('地址')->nullable();
            $table->point('location')->comment('经纬度')->nullable();
            $table->string('recyclables')->comment('来料回收物')->nullable();
            $table->string('harmful_waste')->comment('有害垃圾')->nullable();
            $table->integer('bulky_waste')->comment('大件垃圾')->nullable();
            $table->string('smell')->comment('气味检测')->nullable();
            $table->string('bulky_processing')->comment('大件处理')->nullable();
            $table->string('harmful_processing')->comment('有害处理')->nullable();
            $table->string('water')->comment('用水')->nullable();
            $table->string('electric')->comment('用电')->nullable();
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('transfer_plants');
    }
}
